package com.sc.utils;


import org.springframework.context.ApplicationContext;

public class ApplicationContextUtil {
    private static ApplicationContext context;

    public static void setContext(ApplicationContext applicationContext) {
        context = applicationContext;
    }

    public static <T> T getBean(Class clazz) {
        return (T)context.getBean(clazz);
    }
}
